from selenium import webdriver
from selenium.webdriver.common.by import By
import requests
dr =webdriver.Firefox()
dr.get('https://mc.kurogames-ads.com/download/?pkg_id=A1449&page_id=FFfqpAlbPW&utm_source=baidu&bd_vid=9448693018741968037')

# 1.定位元素，获取元素的scr属性值
el=dr.find_element(By.XPATH,'//video')
url=el.get_attribute('src')

# 2.利用get请求访问图片，获取http相应内容
resp=requests.get(url)
t=resp.content

# 3.新建一个图片文件，把相应内容放到图片文件中
f = open('../Video/1.mp4','wb+')
f.write(t)
f.close()

